<html>
<head>
    <title>${dataModel["music"].musicName}</title>
</head>
<body>

    <#if dataModel["music"].likes gt 100>

            <h1 style="color: red">${dataModel["music"].musicName}</h1>
    </#if>
        <h1 >${dataModel["music"].musicName}</h1>

<br>
<h3>点赞:</h3>
<h3>${dataModel["music"].likes}</h3>

    <h2>${dataModel["music"].comments}</h2>
<br><br>


<button onclick="playMusic(music.fileLocation)">播放音乐</button>

<script>
    function playMusic(fileId) {
        // 使用接口中的文件ID拼接音乐播放地址
        var musicUrl = '/mp3/' + fileId;
        // 创建一个音频对象，进行播放
        var audio = new Audio(musicUrl);
        audio.play();
    }
</script>
</body>
</html>
